﻿define(function (require, exports, module) {
    "require:nomunge,exports:nomunge,module:nomunge";
    var $ = require("jquery"),
        forimg = require("forimg")
    ;
    
    var init = function () {
        var $page = $("#page");

       
        bind();
    };

    var bind = function () {
        var $page = $("#page");

        $page.on("click", ".nl_item a", function () {
            var $this = $(this),
                index = $page.find(".nl_item a").index($this)
            ;
            $page.find(".nl_item").removeClass("nl_item_cur").eq(index).addClass("nl_item_cur");
            $page.find(".com_news").hide().eq(index).show(300);

            return false;
        });

        $page.on("click", ".com_news_item a", function () {
            var $this = $(this),
                index = $page.find(".com_news_item a").index($this),
                $par = $this.closest(".com_news_list")
            ;
            $par.find(".com_news_item").removeClass("com_news_item_cur").eq(index).addClass("com_news_item_cur");
            $par.find(".cni_con").hide();
            $this.closest(".com_news_item").find(".cni_con ").show(300);

            return false;
        });

    };

    init();


   
});
